home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / dictionaries-common.preinst < prev    next >
Encoding:
Text File  |  2006-12-19  |  926 b   |  29 lines

  1. #! /bin/sh
  2. # preinst script for dictionaries-common
  3.  
  4. set -e
  5.  
  6. case "$1" in install|upgrade)
  7.     # This will clean up the alternatives for ispell-dictionary.hash
  8.     # set by the pre-Policy ispell dictionary packages
  9.     # A /var/lib/dpkg/alternatives/ispell-dictionary.hash file is sometimes left
  10.     # if alternative was set to manual mode. Setting it to --auto ensures removal.
  11.     DICTS=`/usr/sbin/update-alternatives --display ispell-dictionary.hash \
  12.       | grep priority | cut -f1 -d" "`
  13.     for i in $DICTS ; do
  14.         /usr/sbin/update-alternatives --remove ispell-dictionary.hash $i
  15.     done
  16.     /usr/sbin/update-alternatives --auto ispell-dictionary.hash
  17.     # The same for wordlists
  18.     WORDS=`/usr/sbin/update-alternatives --display dictionary \
  19.       | grep priority | cut -f1 -d" "`
  20.     for i in $WORDS ; do
  21.         /usr/sbin/update-alternatives --remove dictionary $i
  22.     done
  23.     /usr/sbin/update-alternatives --auto dictionary
  24.     ;;
  25. esac
  26.  
  27.  
  28.  
  29.